﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Clmp.Data.DBEntity2
{
    /// <summary>
    /// 数据库、实体映射接口
    /// </summary>
    public interface IMapping
    {
        /// <summary>
        /// 获取数据表的主键列名
        /// </summary>
        /// <typeparam name="TEntity">实体类型</typeparam>
        /// <returns>主键列名</returns>
        string GetTablePrimaryKey<TEntity>() where TEntity : Entity;
        /// <summary>
        /// 获取实体对应的表名
        /// </summary>
        /// <typeparam name="TEntity">实体类型</typeparam>
        /// <returns>实体对应表名</returns>
        string GetTableName<TEntity>() where TEntity : Entity;
    }
}
